import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/erp/` + url, ...arg)

/**
 * Api接口管理器
 *
 * @author jbb
 * @date  2023/11/21 14:11
 **/
export default {
	// 根据合同模板获取服务类目类别list
	serviceProjectListByTemplateId(templateId) {
		return request('serviceProject/list', { templateId }, 'get')
	},
	// 获取服务类目类别tree
	serviceProjectTree() {
		return request('serviceProject/tree', {}, 'get')
	},
	// 根据合同模板获取服务类目类别tree
	serviceProjectTreeByTemplateId(templateId) {
		return request('serviceProject/selectTree', { templateId }, 'get')
	},

	// 根据服务项目id获取服务类别
	serviceTypeByProjectId(projectId) {
		return request('serviceProject/selectProjectObj', { projectId }, 'get')
	}
}
